<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div class="modal-dialog">
	<div class="modal-content">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal"
				aria-hidden="true">X</button>
			<h3 id="myModalLabel">${empty entity?'新增':'修改' }提现信息</h3>
		</div>
		<div class="modal-body">
			<form class="form-horizontal" method="post" id="sysUserForm"  name="withDrawForm"
				action="withdraw/save${empty entity?'Insert':'Update' }.htm"
				role="form">
				<div class="form-group">
					<label class="col-sm-2 control-label">客户编号<font color="red">&nbsp;*</font></label>
					<div class="col-sm-10">
						<input type="hidden" value="${entity.withdrawId }"
							name="withdrawId" /> <input type="text"
							class="form-control required" id="withdraw_customerId"
							name="customerId" value="${entity.customerId }"> 
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">实际到帐金额<font color="red">&nbsp;*</font></label>
					<div class="col-sm-10">
<%-- 						<textarea id="editor" name="introduction">${entity.introduction }</textarea> --%>
												<input type="text" class="form-control"
													name="trueQuota"  id="withdraw_trueQuota"  value="${entity.trueQuota }">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">状态<font color="red">&nbsp;*</font></label>
					<div class="col-sm-10">
						<label class="checkbox-inline"> <input type="radio"
							name="state" value="0" ${entity.state=='1'?'checked':'' }>
							提现中
						</label> <label class="checkbox-inline"> <input type="radio"
							name="state" value="1" ${entity.state=='0'?'checked':'' }>
							提现成功
						</label>
						 <label class="checkbox-inline"> <input type="radio"
							name="state" value="2" ${entity.state=='0'?'checked':'' }>
							全部还款
						</label>
						 <label class="checkbox-inline"> <input type="radio"
							name="state" value="3" ${entity.state=='0'?'checked':'' }>
							提现失败
						</label>
						 <label class="checkbox-inline"> <input type="radio"
							name="state" value="4" ${entity.state=='0'?'checked':'' }>
							还款中
						</label>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">逾期金额/天<font color="red">&nbsp;*</font></label>
					<div class="col-sm-10">
						<input type="number" step="1"  class="form-control" name="sort" id="withdraw_overdue"
							value="${entity.overdue }">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">分期期数</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="instalPeriod" id="withdraw_instalPeriod"
							value="${entity.instalPeriod }">
					</div>
				</div>
				<span id="tip" style="color: red; font-size: 14px; margin-left: 20px;"></span>
			</form>
		</div>
		<div class="modal-footer">
			<button class="btn btn-default" data-dismiss="modal"
				aria-hidden="true">取消</button>
			<button class="btn btn-primary" data-dismiss="modal">保存</button>
		</div>
	</div>
</div>
<script type="text/javascript"
	src="resources/js/My97DatePicker/WdatePicker.js" charset="utf-8"></script>
<script src="resources/ueditor/ueditor.config.js" type="text/javascript"></script>
<script src="resources/ueditor/ueditor.all.min.js" type="text/javascript"></script>

<script type="text/javascript">
// 	var ue = UE.getEditor("editor");
	function check_fun() {
		$("#tip").html("");
		var b = true;
		var instalPeriod = $('input[name="instalPeriod"]:checked').val();
		var state = $('input[name="state"]:checked').val();
		var overdue = $("#withdraw_overdue").val();
		var trueQuota = $("#withdraw_trueQuota").val();
		var customerId = $("#withdraw_customerId").val();
		
		if (instalPeriod == null || instalPeriod.trim() == '') {
			$("#tip").html("请输入分期期数");
			b = false;
		}
		if (overdue == null || overdue.trim() == '') {
			$("#tip").html("请输入逾期金额/天");
			b = false;
		}
		if (state == undefined) {
			$("#tip").html("请选择状态");
			b = false;
		}
		if (trueQuota == null || trueQuota.trim() == '') {
			$("#tip").html("请输入实际到帐金额");
			b = false;
		}
		if (customerId == null || customerId.trim() == '') {
			$("#tip").html("请输入客户编");
			b = false;
		}
		return b;
	}
</script>